package com.itheima.day11.bytestream.test2;

import java.io.FileOutputStream;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        // 创建字节输入流对象
        FileOutputStream fos = new FileOutputStream("D:\\aheima\\JavaSE加强\\aaa\\ttt.txt");

        // 写数据
        byte[] chars = {97,98,99,100,101,102,103};
        fos.write(chars,2,chars.length-2);

        // 释放资源
        fos.close();
    }
}
